//
//  GMLoginViewController.m
//  GoodsManagement
//
//  Created by 车浩 on 2017/3/18.
//  Copyright © 2017年 CheHao. All rights reserved.
//

#import "GMLoginViewController.h"
#import "CALayer+Transition.h"
#import "MBProgressHUD+Category.h"

@interface GMLoginViewController ()<UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextField *userNameTextField;
@property (weak, nonatomic) IBOutlet UITextField *passwordTextField;

//@property (strong, nonatomic) MBProgressHUD *hud;


@end

@implementation GMLoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    _hud = [[MBProgressHUD alloc] initWithView:self.view];
    // Do any additional setup after loading the view from its nib.
}

- (void)initWithTextField{
    
    self.userNameTextField.delegate = self;
    self.passwordTextField.delegate = self;
    
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    
    [self.view endEditing:YES];
    return YES;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (IBAction)submitButton:(id)sender {
        
//        [MBProgressHUD showMessage:@"请稍后"];
//        //
//        [NSThread sleepForTimeInterval:3.0f];
//        
//        [MBProgressHUD hideHUD];

    

   
    
    [UIApplication sharedApplication].keyWindow.rootViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateInitialViewController];
    
    [[UIApplication sharedApplication].keyWindow.layer transitionWithAnimType:TransitionAnimTypeRamdom subType:TransitionSubtypesFromRamdom curve:TransitionCurveRamdom duration:1.0f];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
